package org.goldfish.client_demo.client_demo.service;

import org.goldfish.distributed_framework.api.RpcMethod;
import org.goldfish.distributed_framework.api.Service;


public class RegService extends BasicRedisService implements Service {
    @RpcMethod
    public String reg(String name, Long count) {
        try {
            return "成功-" + getConnection().set(name, String.valueOf(count));
        } catch (Exception e) {
            throw new RuntimeException ("失败-" + e.getMessage());
        }
    }
}
